package patienceCommon.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import patienceCommon.vo.SnowflakeId;


@Controller
@RequestMapping(value = "/common")
public class CommonController {
	@Autowired
	private SnowflakeId snowflakeId;
	
	
	//测试生成唯一主键
	@RequestMapping(value = "/initPk")
    @ResponseBody
    public Object initPk() {
    	return snowflakeId.nextId();
    }

}
